<template>
	<div class="main">
  <el-card class="box-card" style="margin-bottom: 10px">
    
    <div>
      <div>范 围</div>
      <el-tree
        :props="props"
        :load="loadNode"
        lazy
        show-checkbox
        @check-change="handleCheckChange"
      >
      </el-tree>
    </div>
  </el-card>
  <el-card class="box-card" style="margin-bottom: 10px">
    <div slot="header" class="clearfix" style="display: flex">
      <div style="width: 20%">允许修改已提交内容</div>
      <el-switch
        v-model="modifyValue"
        active-color="#13ce66"
        inactive-color="#ff4949"
        style="margin-left: 70%"
      >
      </el-switch>
    </div>
    <div style="display: flex">
      <div style="width: 20%">提交后允许查看</div>
      <el-switch
        v-model="lookValue"
        active-color="#13ce66"
        inactive-color="#ff4949"
        style="margin-left: 70%"
      >
      </el-switch>
    </div>
  </el-card>
  <el-card class="box-card" style="margin-bottom: 10px">
    <div slot="header" class="clearfix" style="display: flex">
      <div style="width: 20%">定时结束</div>
      <el-switch
        v-model="endValue"
        active-color="#13ce66"
        inactive-color="#ff4949"
        style="margin-left: 70%"
      >
      </el-switch>
    </div>
    <div v-show="this.endValue" class="block">
      <div style="margin-left: 50px">
        <span class="demonstration">设置截止时间 </span>

        <el-date-picker
          v-model="endTime"
          type="datetime"
          placeholder="选择日期时间"
          default-time="12:00:00"
        >
        </el-date-picker>
      </div>
    </div>
  </el-card>

  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="create()">创 建</el-button>
  </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      modifyValue: true,
      lookValue: true,
      endValue: false,
      pickerOptions: {
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
    };
  },
  methods:{
    create() {
      this.$router.push("/mobileHome");
    },
  }
};
</script>

<style scoped>
.main{
  width: 100%;
  height: 100%;
}

</style>